Clear
TheClear
method clears the content of this link-source object.
void Clear (in ODUpdateID id, in ODLinkKey key);
id
- The update ID associated with the new empty content.
key
- A valid link key obtained by a prior call to the
Lock
method.DISCUSSION
If your part is the source part for this link-source object, you call this method to remove the link-source object's previous content before updating the source data. This method removes all data in the contents property (kODPropContents
) from the link-source object's content storage unit.The
id
parameter identifies the new version of this link-source object's content; its value depends on the circumstance in which this method is called:
The
- If your part originated the changes to its source content, the
id
parameter should be a new update ID that you obtained by calling theUniqueUpdateID
method of the session object.- If the changes occurred because the source content of this link contains the destination content of another link that was updated, the
id
parameter should be the update ID that your part received when it was notified to update the destination content within the source content for this link.- If your part originally created this link-source object with promise data and its
CreateLink
method is being called again to create a new link destination, theid
parameter should be the current update ID for this link-source object. You can call theGetUpdateID
method to get the current update ID.
key
parameter ensures thread safety. Before calling this method, you must call this link-source object'sLock
method to obtain this key.EXCEPTIONS
kODErrInvalidLinkKey
- The
key
parameter is not a valid key for this link-source object.kODErrInvalidPermissions
- Draft permissions do not allow modifications.
kODErrUnknownUpdateID
- The specified update ID is the reserved value
kODUnknownUpdate
.SEE ALSO
TheODLinkKey
type (page 924).
TheODUpdateID
type (page 917).
TheODLinkSource::GetContentStorageUnit
method (page 380).
TheODLinkSource::GetUpdateID
method (page 381).
TheODLinkSource::Lock
method (page 382).
TheODSession::UniqueUpdateID
method (page 623).
"Updating a Link at the Source" on page 386 in OpenDoc Programmer's Guide.
Main | Page One | What's New | Apple Computer, Inc. | Find It | Contact Us | Help